<template>
  <div class="list listImgs">
    <ul>
      <router-link tag="li" to="" v-for="(item,index) in list" :key="index">
        <div class="img">
          <img :src="item.pictureUrl" alt class="image" />
        </div>
        <div class="infos">
          <p class="title">{{item.chineseName}}</p>
          <!--<p class="desc">{{item.desc}}</p>-->
          <p class="price">
            <span class="nowPrice">&yen;{{item.skillPrice|formatMoney}}</span>
            <span class="oldPrice">原价&yen;{{item.goodsPrice|formatMoney}}</span>
          </p>
        </div>
        <!-- <div class="shopcar">
          <img src="http://wstatic.zgt56.com/202005/202005090327421589009262155.png" alt />
        </div>-->
      </router-link>
    </ul>
  </div>
</template>

<script>
export default {
  props: {
    list: {
      type: Array,
      default: () => {
        return [];
      }
    }
  },
  data() {
    return {};
  }
};
</script>

<style lang="scss" scoped>
.list {
  width: 1200px;
  margin: 20px auto 0;
  li,
  ul {
    list-style: none;
  }
  ul {
    padding: 0;
    margin: 0;
    width: 1220px;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    li {
      width: 230px;
      border: 1px solid #e6eaf0;
      &:hover{
        cursor: pointer;
      }
      img {
        display: block;
        width: 228px;
        height: 228px;
        margin: 0 auto;
        .image {
          width: 100%;
          height: 100%;
        }
      }
      .shopcar {
        display: none;
      }
    }
  }
  &.scaleImg {
    width: 930px;
    margin: 0;
    ul {
      width: 465px;
      overflow: hidden;
      li {
        position: relative;
        width: 230.5px;
        height: 278px;
        margin: 0;
        padding-top: 20px;
        &:last-child {
          border-left: 0;
        }
        img {
          width: 150px;
          height: 150px;
          margin: 0 auto;
        }
        &:hover {
          border-color: #ab0032;
          &::before,
          &::after {
            content: "";
            background: #ab0032;
            position: absolute;
            left: 0;
            z-index: 99;
          }
          &::before {
            height: 100%;
            width: 1px;
            top: 0;
          }
          &::after {
            height: 1px;
            width: 100%;
            bottom: 0;
          }
        }
      }
    }
  }
  &.smallImg2 {
    width: 930px;
    margin: 0;
    ul {
      width: 930px;
      overflow: hidden;
      li {
        position: relative;
        width: 211.5px;
        height: 161px;
        margin: 0;
        border-left: 0;
        padding: 31px 0 30px 20px;
        clear: both;
        img {
          width: 126px;
          height: 126px;
          float: right;
        }
        .infos {
          width: 80px;
          padding: 0;
          .title {
            height: 43px;
            white-space: normal;
            text-align: left;
            margin: 0;
          }
          .desc {
            display: none;
          }
          .price {
            margin-top: 20px;
            white-space: normal;
            .oldPrice {
              margin-top: 6px;
              display: block;
            }
          }
        }
        &:hover {
          border-color: #ab0032;
          &::before {
            content: "";
            height: 100%;
            width: 1px;
            background: #ab0032;
            position: absolute;
            left: 0;
            top: 0;
            z-index: 99;
          }
        }
      }
    }
  }
  &.smallImg3 {
    margin: 10px auto 0;
    ul {
      width: 1220px;
      height: 305px;
      overflow: hidden;
      li {
        border: 0;
        position: relative;
        background: #fff;
        margin-right: 12.5px;
        .img {
          width: 230px;
          height: 230px;
          border: 1px solid #e6eaf0;
          overflow: hidden;
          img {
            width: 100%;
            height: 100%;
          }
        }
        .desc {
          display: none;
        }
      }
    }
  }
  &.smallImg4 {
    width: 595px;
    height: 500px;
    margin: 0;
    border: 1px solid #e6eaf0;
    box-sizing: border-box;
    border-left: 0;
    border-right: 0;
    ul {
      width: auto;
      padding: 10px 20px;
      overflow: hidden;
      li {
        width: 33.33%;
        height: 250px;
        border: 0;
        margin: 0;
        img {
          width: 160px;
          height: 160px;
        }
        .desc {
          display: none;
        }
        .price {
          .nowPrice {
            font-size: 14px;
            color: #333;
          }
        }
      }
    }
  }
  &.smallImg5 {
    width: 309px;
    margin: 0;
    ul {
      width: 309px;
      max-height: 436px;
      overflow: hidden;
      li {
        width: 100%;
        clear: both;
        margin: 0;
        padding: 15px;
        border-top: 0;
        display: flex;
        align-items: center;
        border-left: 0;
        border-right: 0;
        img {
          width: 80px;
          height: 80px;
          float: left;
        }
        .infos {
          width: 170px;
          padding: 0;
          .title {
            max-height: 80px;
            padding-left: 15px;
            padding-top: 18px;
            margin: 0;
            text-align: left;
          }
          .desc {
            display: none;
          }
          .price {
            padding-left: 15px;
            text-align: left;
          }
        }
        .shopcar {
          display: block;
          img {
            width: 30px;
            height: 30px;
          }
        }
      }
    }
  }
  &.smallImg6 {
    width: 930px;
    overflow: hidden;
    margin: 0;
    ul {
      width: 930px;
      height: 340px;
      overflow: hidden;
      position: relative;
      li {
        width: 232.5px;
        height: 100%;
        margin: 0;
        border: 1px solid #e6eaf0;
        box-sizing: border-box;
      }
    }
  }
}
.infos {
  padding: 0 8px;
}
.title {
  font-size: 16px;
  color: #212529;
  margin: 12px 8px;
  line-height: 22px;
}
.price {
  margin: 10px 0;
}
p{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nowPrice{
  font-size: 16px;
  margin-right: 20px;
  color: #AB0032;
}
.oldPrice{
  font-size: 12px;
    color: #9fa9ba;
    text-decoration: line-through;
}
</style>